package org.springblade.modules.repair.vo.statistics.ps;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @Description
 * @Author ysq
 * @Date 2023/6/30
 **/
@Data
public class PlanLoseVO {

	@ApiModelProperty(value = "已脱保电梯数")
	private Long loseEleTotal;

	@ApiModelProperty(value = "未清除剩余排期数")
	private Long notDelPlanTotal;

	@ApiModelProperty(value = "脱保梯剩余排期清除进度占比")
	private BigDecimal notDelPlanPct;

	public Long getLoseEleTotal() {
		if (this.loseEleTotal == null) {
			return 0L;
		}
		return loseEleTotal;
	}

	public Long getNotDelPlanTotal() {
		if (this.notDelPlanTotal == null) {
			return 0L;
		}
		return notDelPlanTotal;
	}

	public BigDecimal getNotDelPlanPct() {
		if (this.notDelPlanPct == null) {
			return BigDecimal.ZERO;
		}
		return notDelPlanPct.multiply(new BigDecimal(100)).setScale(1, BigDecimal.ROUND_HALF_UP);
	}
}
